/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package tanks;

/**
 *
 * @author Александр
 */
import com.sun.lwuit.*;
import com.sun.lwuit.Image;
import java.io.IOException;
public class GameplayDraw extends Component{
    
    int fieldWidth;
    int fieldHeight;
    Game game = Game.Instance();
    Graph graph;
    public GameplayDraw(){
        StartGame();
    }
    public void StartGame(){
          this.graph = new Graph(game.Grid);
          game.randomFillMap();
    }
    public void paint(Graphics g) {
        Image img = graph.drawMap();
        g.drawImage(img,0,0,img.getWidth(),img.getHeight());
        /*
        for(int i = 0; i<10; i++){
           for(int j = 0; j<10; j++){
             //  g.drawImage(GrassImg, i*30, j*30, 30, 30);
           }
       }*/
   }
}
